package com.wnhz.work.yz.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.wnhz.work.yz.R;

/**
 * Created by admin on 2016/12/27.
 */
public class SubmitAdapter extends BaseAdapter {
    private Context context;

    public SubmitAdapter(Context context) {
        this.context = context;
    }

    @Override
    public int getCount() {
        return 2;
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        SubmitViewHolder viewHolder = new SubmitViewHolder();
        if (convertView == null) {
            convertView = LayoutInflater.from(context).inflate(R.layout.submit_item, null);

            convertView.setTag(viewHolder);
        } else {
            viewHolder = (SubmitViewHolder) convertView.getTag();

        }

        return convertView;
    }

    class SubmitViewHolder {
        TextView tv_title;
        TextView tv_price;
    }
}
